package proxy;

import java.lang.reflect.Proxy;

/**
 * Created by luzl on 8/7/2017.
 */
public class LogProxyTest {
    public static void main(String[] args){
        //被代理类
        Sell vendor=new Vendor();
        LogProxy proxy=new LogProxy(vendor);

        //获取代理类
        Sell sell=(Sell)Proxy.newProxyInstance(Sell.class.getClassLoader(),new Class[]{Sell.class},proxy);
        sell.sell();
    }
}
